[NTG-context] Wiki - question about Command/ pages which start with a space character

2024-04-14 Thread garulfo
/ help Command/ high Command/ highlight Command/ label Command/ labellanguage Command/ labeltext Command/ labeltexts Command/ language Command/ leftlabeltext Command/ linenote Command/ low Command/ lowhigh Command/ lowmidhigh Command/ margindata Command/ mathcommand Command/ mathdoubleextensible Com

Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Willi Egger via ntg-context
Hans, Wolfgang, I am so happy to receive your immediate answers. — Thanks a lot, the problem is solved and I get the colored labeltext! Thank you Willi > On 24 Jun 2022, at 19:19, Hans Hagen via ntg-context > wrote: > > On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrot

Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Hans Hagen via ntg-context
On 6/24/2022 4:34 PM, Willi Egger via ntg-context wrote: Hi all, Sorry for bothering you again. I would like that lua is returning a colored string, which is a label-text. The following does not work, the labeltext remains black, there is no error though: return context.color({&quo

Re: [NTG-context] return a labeltext with color...

2022-06-24 Thread Wolfgang Schuster via ntg-context
Willi Egger via ntg-context schrieb am 24.06.2022 um 16:34: Hi all, Sorry for bothering you again. I would like that lua is returning a colored string, which is a label-text. The following does not work, the labeltext remains black, there is no error though: return context.color({&quo

[NTG-context] return a labeltext with color...

2022-06-24 Thread Willi Egger via ntg-context
Hi all, Sorry for bothering you again. I would like that lua is returning a colored string, which is a label-text. The following does not work, the labeltext remains black, there is no error though: return context.color({"red"},context.labeltext(s)) What is the correct approac

Re: [NTG-context] Simple question

2022-05-10 Thread Denis Maier via ntg-context
r mode=simple mainfile.tex Doable? To set language dependent texts you can use the labeltext mechanism which is used by ConTeXt to change the captions for floats etc. Besides the default \labeltext and \setuplabeltext commands you can create your own instance of the mechanism for your

Re: [NTG-context] Simple question

2022-05-10 Thread Gerben Wierda via ntg-context
se can be used as as text. >> >> In the end I’d like to compile with >> >> context language=fr mode=simple mainfile.tex >> >> Doable? > > To set language dependent texts you can use the labeltext mechanism which is > used by ConTeXt to ch

Re: [NTG-context] Simple question

2022-05-10 Thread Wolfgang Schuster via ntg-context
=simple mainfile.tex Doable? To set language dependent texts you can use the labeltext mechanism which is used by ConTeXt to change the captions for floats etc. Besides the default \labeltext and \setuplabeltext commands you can create your own instance of the mechanism for your texts

Re: [NTG-context] TOC labeltext and no partlabel

2021-08-25 Thread Adam Reviczky via ntg-context
Thank you very much Wolfgang for the explanation, Both solutions make sense now and work great. Regards, Adam On Wed, Aug 25, 2021 at 11:46 AM Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02: > > Hi, > > > > I have

Re: [NTG-context] TOC labeltext and no partlabel

2021-08-25 Thread Wolfgang Schuster via ntg-context
Adam Reviczky via ntg-context schrieb am 25.08.2021 um 02:02: Hi, I have asked this question before, but now I cannot get it working again. https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc I want to set partlabels in my TOC but not in the document

[NTG-context] TOC labeltext and no partlabel

2021-08-24 Thread Adam Reviczky via ntg-context
Hi, I have asked this question before, but now I cannot get it working again. https://ntg-context.ntg.narkive.com/lvvdNOQz/the-appendices-envrionment-and-title-in-toc I want to set partlabels in my TOC but not in the document itself. The desired output would be: --- Contents Chapter 1 Bodypart

Re: [NTG-context] Using Lua to format lecture titles

2021-08-17 Thread Wolfgang Schuster via ntg-context
={Lecture }] \setupcombinedlist [content] [list={lecture}] \define[3]\LectureListCommand {\labeltext{lecture}#1\doiftext{#2}{: #2}\filler[dotfill]#3\par} \setuplist [lecture] [alternative=command, command=\LectureListCommand] \startsetups [footer:left] \labeltext{lecture} \getmarking

[NTG-context] Problem with chapter numbering

2021-07-13 Thread Fabrice Couvreur
#2% { \FramedText{{\cap\labeltext{chapter}}\space#1 \\ \bfc#2} } \unexpanded\def\processheadnumber#1% {\getmarking[chapternumber]} \setuphead [chapter] [style=\bfd, align={flushleft,broad}, numbercommand=\processheadnumber, command=\HeadTitle

Re: [NTG-context] Header for a book

2021-07-13 Thread Fabrice Couvreur
Hi, My first solution is incorrect ; with the second solution, I don't understand why the first chapter is not numbered while the second is with number 1. Thanks. Fabrice \unexpanded\def\HeadTitle#1#2% { \FramedText{{\cap\labeltext{chapter}}\space#1 \\ \bfc#2} } \unexpanded

[NTG-context] Header for a book

2021-07-12 Thread Fabrice Couvreur
, foregroundstyle={\switchtobodyfont[11pt]}, align={left, broad}, frame=off, width=\textwidth, ] \setuplabeltext [en] [chapter=CHAPITRE] \setuphead [chapter] [bodypartlabel=] \startsetups [header] \labeltext{chapter

Re: [NTG-context] Footer

2021-07-06 Thread Fabrice Couvreur
>\dorecurse{10}{\input knuth} > > \stopchapter > > \stoptext > > > \startsetups [footer:leftpage] > \prefixedpagenumber > \space > \undepthed{\blackrule > [ > width=\linewidth, > height=\strutht, >

Re: [NTG-context] Footer

2021-07-05 Thread Wolfgang Schuster
oterheight+\bottomspace\relax, ]} \space \labeltext{chapter} \getmarking[chapternumber] \stopsetups \startsetups [footer:rightpage] \getmarking[chapter] \space \undepthed{\blackrule [ width=\linewidth, height=\strutht, depth=\dimexpr\fo

[NTG-context] space between chapter and chapter number (in words)

2020-10-14 Thread jbf
nothing to solve the problem: \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 2.5cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-2.5cm\relax    \doifsomething{\rawstructurelistuservariable{year

[NTG-context] correct vertical alignment in ToC

2020-09-29 Thread jbf
  {\hbox\bgroup \hbox to 2.5cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-2.5cm\relax    \doifsomething{\rawstructurelistuservariable{year}} {{\structurelistuservariable{year}}\crlf}%    \currentlistentrytitle % title

[NTG-context] Fwd: Re: styling individual parts of ToC entry

2020-09-09 Thread jbf
as labeltext and ignore the title (but use a empty argument when set userdata like the author). \definehead   [forword] [chapter] \setuplabeltext   [en]   [forword=Forword,    chapter=Chapter ] \setuphead   [forword]   [frontpartlabel=forword,    conversion=empty] \setupsectionblock

Re: [NTG-context] styling individual parts of ToC entry

2020-09-09 Thread jbf
set the forword string as labeltext and ignore the title (but use a empty argument when set userdata like the author). \definehead   [forword] [chapter] \setuplabeltext   [en]   [forword=Forword,    chapter=Chapter ] \setuphead   [forword]   [frontpartlabel=forword,    conversion=empty

Re: [NTG-context] styling individual parts of ToC entry

2020-09-09 Thread Wolfgang Schuster
from Wolfgang. And in the frontmatter itself: \startchapter[foreword][title={\ss Foreword}][author={A. Uthor}] .. You can set the forword string as labeltext and ignore the title (but use a empty argument when set userdata like the author). \definehead [forword] [chapter

Re: [NTG-context] styling individual parts of ToC entry

2020-09-09 Thread jbf
e will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-3cm\relax    \doifsomething{\rawstructurelistuservariable{year}} {{\it\struc

[NTG-context] Fwd: Re: styling individual parts of ToC entry

2020-09-07 Thread jbf
at least). MWE: \definehead [foreword] [title] \definehead [preface] [title] \definehead [mysection] [section] \setupcombinedlist[chapter,foreword,preface,mysection,section, subsection] \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext

Re: [NTG-context] styling individual parts of ToC entry

2020-09-07 Thread Wolfgang Schuster
ons' with authors I need for Chapter Two. I assume I would set up a third definition called \SectionListCommand. Sections will have different labels too - one will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread jbf
ter Two. I assume I would set up a third definition called \SectionListCommand. Sections will have different labels too - one will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgr

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread Wolfgang Schuster
]\ChapterListCommand {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup \hsize\dimexpr\makeupwidth-3cm\relax \doifsomething{\rawstructurelistuservariable{year}} {{\it\structurelistuservariable{year}}\crlf}% \currentlistentrytitle

Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread jbf
regarding the two questions above - not yet, anyway. If someone knows where, please point me to it. \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-3cm\relax    \doifsomething

Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread Wolfgang Schuster
and various manuals do offer various tips on modifying the ToC, but I cannot find anything regarding the two questions above - not yet, anyway. If someone knows where, please point me to it. \define[3]\ChapterListCommand {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext

Re: [NTG-context] author in ToC and other design complications

2020-09-04 Thread Henning Hraban Ramm
pterTocEntry: you call the author by \structurelistuservariable{author} and set the title as #1 in the next line. Just adapt this to your needs. > And how do I get the word 'chapter' to also appear in front of 'One'? Try \labeltext{chapter} in the right place. Good luck & have fun! Hraba

Re: [NTG-context] special chapter label

2020-09-02 Thread Hans Hagen
this does not also affect Chapter Four since that will have a different set of dates). How can I get a specific labeltext set up so that the result is *Chapter Three: 1820-1880*, and also ensure that other chapters either return to just the chapter number or, if needs be, can also indicate

[NTG-context] special chapter label

2020-09-01 Thread jbf
Four since that will have a different set of dates). How can I get a specific labeltext set up so that the result is *Chapter Three: 1820-1880*, and also ensure that other chapters either return to just the chapter number or, if needs be, can also indicate different date ranges? I have looked

Re: [NTG-context] Label to delete in the table of contents

2020-08-24 Thread Fabrice Couvreur
um 16:02: > > Hello, > For the title of the chapters I use the following command. > > \unexpanded\def\HeadTitle#1#2% >{\framed > [frame=off, >width=fit, >align=flushleft] >{\color[darkgray]{\tfxx\cap\bf\labeltext{chapter}} > \bl

Re: [NTG-context] Label to delete in the table of contents

2020-08-24 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 23.08.2020 um 16:02: Hello, For the title of the chapters I use the following command. \unexpanded\def\HeadTitle#1#2%    {\framed [frame=off,        width=fit,        align=flushleft]  {\color[darkgray]{\tfxx\cap\bf\labeltext{chapter}} \blank#1\blank#2} When I

[NTG-context] Label to delete in the table of contents

2020-08-23 Thread Fabrice Couvreur
Hello, For the title of the chapters I use the following command. \unexpanded\def\HeadTitle#1#2% {\framed [frame=off, width=fit, align=flushleft] {\color[darkgray]{\tfxx\cap\bf\labeltext{chapter}} \blank#1\blank#2} When I compile my project, I have the label

Re: [NTG-context] Chapter number with Luametafun

2020-08-18 Thread Wolfgang Schuster
Fabrice Couvreur schrieb am 18.08.2020 um 16:24: Hello, How to get the number of the current chapter ? \namedheadnumber{chapter} How to get the label "Chapitre" ? \labeltext{chapter} Wolfgang _

Re: [NTG-context] Two issues with respect to sections in ConTeXt

2020-06-06 Thread Wolfgang Schuster
, parts, etc. e.g. Chapter (EN) or Capítulo (ES) without manually writing a \setuplabeltext for every language, so he suggested that I move my question here and there we are. Making the labels accessible is the simple part but not as part of the labeltext class. The harder part is to move

Re: [NTG-context] Definition of \registerpagerange (Henning Hraban Ramm)

2020-05-06 Thread Hynek, Stefan
\global\setconstant\c_strc_registers_page_state\plusone > \dostarttagged\t!registerpagerange\empty > \dostarttagged\t!registerfrompage\empty > \withregisterpagecommand{#2}{#3}{#4}{#5}% > \dostoptagged > \ifconditional\c_strc_registers_following >\ifnum#3=\nu

Re: [NTG-context] Definition of \registerpagerange

2020-05-05 Thread Henning Hraban Ramm
tagged \ifconditional\c_strc_registers_following \ifnum#3=\numexpr#6-1\relax \labeltext{following:\s!singular}% \else \labeltext{following:\s!plural}% \fi \else \registeronepagerangeseparator \dostarttagged\t!registertopage\empty

Re: [NTG-context] inserting figure labels

2019-05-12 Thread Hans van der Meer
mailto:havdm...@ziggo.nl>>: > >> Placing a float figure with >> \placefigure[][]{labeltext}{\externalfigure[]} >> delivers a figure with a label like "Figure V.3 labeltext" (depending on the >> setup) >> >> Now I want to intersperse th

Re: [NTG-context] inserting figure labels

2019-05-12 Thread Henning Hraban Ramm
Am 2019-05-11 um 21:39 schrieb Hans van der Meer : > Placing a float figure with > \placefigure[][]{labeltext}{\externalfigure[]} > delivers a figure with a label like "Figure V.3 labeltext" (depending on the > setup) > > Now I want to intersperse this with an

[NTG-context] inserting figure labels

2019-05-11 Thread Hans van der Meer
Placing a float figure with \placefigure[][]{labeltext}{\externalfigure[]} delivers a figure with a label like "Figure V.3 labeltext" (depending on the setup) Now I want to intersperse this with an \externalfigure[] not within a placefigure but still accompanied

Re: [NTG-context] Ending strings with non-break space in lang-txt.lua

2018-12-06 Thread Hans Hagen
On 12/6/2018 10:26 AM, Marco Patzer wrote: On Thu, 6 Dec 2018 09:34:57 +0100 Hans Hagen wrote: Also, how about: \at{\labeltext{atpage}}[#1] indeed, that is the command to use Don't get too hung up on that command. That was just a quick way to demonstrate the point and create an MWE

Re: [NTG-context] Ending strings with non-break space in lang-txt.lua

2018-12-06 Thread Marco Patzer
On Thu, 6 Dec 2018 09:34:57 +0100 Hans Hagen wrote: > > Also, how about: > > > > \at{\labeltext{atpage}}[#1] > > indeed, that is the command to use Don't get too hung up on that command. That was just a quick way to demonstrate the point and create an MW

Re: [NTG-context] Ending strings with non-break space in lang-txt.lua

2018-12-06 Thread Hans Hagen
ever make sense to have a regular space at the end of those commands? I just skimmed through the file and most, if not all, strings ending in a space would actually benefit from having it replaced by a non-break space IMO. Example: \def\pageref#1%% {\in{figure}[#1] \labeltext{atpage}\at[#1]} \sta

Re: [NTG-context] Ending strings with non-break space in lang-txt.lua

2018-12-05 Thread Alan Braslau
> [atpage=at page\nbsp] > > So I wonder: Does it ever make sense to have a regular space at the > end of those commands? I just skimmed through the file and most, if > not all, strings ending in a space would actually benefit from having > it replaced by a non-break space IMO

[NTG-context] Ending strings with non-break space in lang-txt.lua

2018-12-05 Thread Marco Patzer
not all, strings ending in a space would actually benefit from having it replaced by a non-break space IMO. Example: \def\pageref#1%% {\in{figure}[#1] \labeltext{atpage}\at[#1]} \starttext \hsize 3cm See \pageref{foo}. \page \startplacefigure [referenc

Re: [NTG-context] referencing the equation

2018-08-09 Thread Henri Menke
I usually define my own reference formats, “ineq” for equations, “infig” for figures: \definereferenceformat[ineq][left=(,right=)] \definereferenceformat[infig][left=\labeltext{figure}] \starttext \starttext \placeformula \startformula \startalign \NC a_1 x + b_1 y \NC = c_1 \NR[eq:1] \NC

Re: [NTG-context] Unexpected emergency stop

2018-02-10 Thread Tim Steenvoorden
gt; \doifdefinedelse{in#1} > {\getvalue{in#1}[#1:#2]} > {\writestatus{references}{reference format in#1 not defined} > \in[#1:#2]} > \stoptexdefinition % #3 is optional and gobbled by \in > > \definereferenceformat[inchp] > [text=\word{\labeltext{chapter}}] > &

Re: [NTG-context] Unexpected emergency stop

2018-02-09 Thread Otared Kavian
{\writestatus{references}{reference format in#1 not defined} > \in[#1:#2]} > \stoptexdefinition % #3 is optional and gobbled by \in > > \definereferenceformat[inchp] > [text=\word{\labeltext{chapter}}] > > \setuplabeltext[en] > [chapter=Chapter~] > > \chapter[chp

[NTG-context] Unexpected emergency stop

2018-02-09 Thread Tim Steenvoorden
#3 is optional and gobbled by \in \definereferenceformat[inchp] [text=\word{\labeltext{chapter}}] \setuplabeltext[en] [chapter=Chapter~] \chapter[chp:first]{First} Works: \see[chp:first] Hangs: \see[chp:first], \stoptext –– -- T.J. Steenvoorden, MSc PhD Candidate | Rad

Re: [NTG-context] Modern CV like cover letter example

2017-12-02 Thread Jonas Baggett
: Hi Pablo, Thanks ! I think you are right about that labeltext doesn't support an extra parameter. Then I will need to do it that way, I guess : \def \gender {male} \doifelse {\gender} {male} {   \setuplabeltext [en] [longtitle=Mister]   \setuplabeltext [fr] [longtitle=Monsieur] }{ % female

Re: [NTG-context] High-level command for translated names

2017-04-30 Thread Wolfgang Schuster
I know they are there in lang-txt.lua, but cannot be accessed via \labeltext. One can access them through Lua but that doesn't seem so elegant. \def\chaptername{% \ctxlua{% context(languages.data.labels.texts.chapter.labels["\currentlanguage"])}} \starttext \language[en] \chaptername \language[

Re: [NTG-context] High-level command for translated names

2017-04-30 Thread Henri Menke
ow can I get the translated names for chapter and section depending on the >> currently active language. I know they are there in lang-txt.lua, but cannot >> be accessed via \labeltext. One can access them through Lua but that doesn't >> seem so elegant. > The problem are the

Re: [NTG-context] High-level command for translated names

2017-04-30 Thread Wolfgang Schuster
I know they are there in lang-txt.lua, but cannot be accessed via \labeltext. One can access them through Lua but that doesn't seem so elegant. The problem are the ["hidden"]=true, table entries for these labels, removing them would make the labels access

[NTG-context] High-level command for translated names

2017-04-30 Thread Henri Menke
Dear list, Inspired by this question on TeX.SX https://tex.stackexchange.com/questions/367433 How can I get the translated names for chapter and section depending on the currently active language. I know they are there in lang-txt.lua, but cannot be accessed via \labeltext. One can access

Re: [NTG-context] Modern CV like cover letter example

2017-04-21 Thread Jonas Baggett
Thank you :-) Le 21.04.17 à 08:40, Aditya Mahajan a écrit : On Thu, 20 Apr 2017, Jonas Baggett wrote: Hi Pablo, Thanks ! I think you are right about that labeltext doesn't support an extra parameter. Then I will need to do it that way, I guess : \def \gender {male} \doifelse {\gender

Re: [NTG-context] Modern CV like cover letter example

2017-04-21 Thread Aditya Mahajan
On Thu, 20 Apr 2017, Jonas Baggett wrote: Hi Pablo, Thanks ! I think you are right about that labeltext doesn't support an extra parameter. Then I will need to do it that way, I guess : \def \gender {male} \doifelse {\gender} {male} { \setuplabeltext [en] [longtitle=Mister

Re: [NTG-context] Modern CV like cover letter example

2017-04-20 Thread Jonas Baggett
Hi Pablo, Thanks ! I think you are right about that labeltext doesn't support an extra parameter. Then I will need to do it that way, I guess : \def \gender {male} \doifelse {\gender} {male} { \setuplabeltext [en] [longtitle=Mister] \setuplabeltext [fr] [longtitle=Monsieur] }{ % female

Re: [NTG-context] Modern CV like cover letter example

2017-04-19 Thread Pablo Rodriguez
labeltext [fr] [Name=nom] > > \starttext > \labeltext{East} % Works > \labeltext{West} % Works > \labeltext[en]{Name} % Doesn't work > \labeltext[fr]{Name} % Doesn't work >\stoptext Hi Jonas, it seems that labeltext works based on \mainlanguage, such as

Re: [NTG-context] Modern CV like cover letter example

2017-04-19 Thread Jonas Baggett
Hello Henri, I tried to use labeltexts without success so far. Here is the simple example I tried to do : \setuplabeltext [East=east, West=west] \setuplabeltext [en] [Name=name] \setuplabeltext [fr] [Name=nom] \starttext \labeltext{East} % Works \labeltext{West} % Works

Re: [NTG-context] labeltext via lua

2017-02-17 Thread Andreas Schneider
: \setuplabeltext[en][test=Something] \startluacode context.startsectionlevel{title="\\labeltext[test]"} -- ... context.stopsectionlevel() \stopluacode The title correctly reads "Something", but the bookmark in the PDF viewer shows "test". also

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Hans Hagen
be a crossover between lua and tex, but that results in the bookmark having the wrong label: \setuplabeltext[en][test=Something] \startluacode context.startsectionlevel{title="\\labeltext[test]"} -- ... context.stopsectionlevel() \stopluacode The title correctly reads "Something&quo

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Andreas Schneider
, but that results in the bookmark having the wrong label: \setuplabeltext[en][test=Something] \startluacode context.startsectionlevel{title="\\labeltext[test]"} -- ... context.stopsectionlevel() \stopluacode The title correctly reads "Something", but the bookmark in the PDF viewer shows &qu

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Hans Hagen
On 2/16/2017 2:12 PM, Andreas Schneider wrote: Am 2017-02-16 11:50, schrieb Hans Hagen: languages.data.labels.texts.appendix.labels.en look into lang-txt.lua Hello Hans, I already looked into this and even printed the whole languages.data table at runtime, but didn't find my keys in there.

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Andreas Schneider
Am 2017-02-16 11:50, schrieb Hans Hagen: languages.data.labels.texts.appendix.labels.en look into lang-txt.lua Hello Hans, I already looked into this and even printed the whole languages.data table at runtime, but didn't find my keys in there. Here is an example which apparently doesn't

Re: [NTG-context] labeltext via lua

2017-02-16 Thread Hans Hagen
On 2/16/2017 11:36 AM, Andreas Schneider wrote: Hello, if I define a labeltext via \setuplabeltext[en][test=Something], how can I access that value via lua? (context.labeltext obviously prints the content, but doesn't allow me to use it in lua). languages.data.labels.texts.appendix.labels.en

[NTG-context] labeltext via lua

2017-02-16 Thread Andreas Schneider
Hello, if I define a labeltext via \setuplabeltext[en][test=Something], how can I access that value via lua? (context.labeltext obviously prints the content, but doesn't allow me to use it in lua). As a related side-request: how can I fix expansion in cases like this: \startsectionlevel

Re: [NTG-context] Define font based on language

2016-05-08 Thread Wolfgang Schuster
Michal Ondrejáš <mailto:michal.ondre...@dlubal.cz> 4. April 2016 um 15:17 Hello I need some help regarding font definitions. The situation is like this: \definefont [issuefont] [SansRegular at 14pt] {\issuefont \labeltext{issue} \crlf \documentvariable{issue}} I need to get chines

[NTG-context] Define font based on language

2016-05-05 Thread Michal Ondrejáš
Hello I need some help regarding font definitions. The situation is like this: \definefont [issuefont] [SansRegular at 14pt] {\issuefont \labeltext{issue} \crlf \documentvariable{issue}} I need to get chinese text into the issue variable, but for that I need to change the font. I need

Re: [NTG-context] Improving Pandoc Support for ConTeXt

2015-10-26 Thread Wolfgang Schuster
needs to be more thoroughly updated to take advantage of MkIV. This translation is not written in a ConTeXtish way. A lot of \startmode[*en,*uk] \chapter{...} \stopmode \startmode[*es] \chapter {...} \stopmode etc could be written using \labeltext. For example: \chapter{\labeltext{notes}] \setuplab

Re: [NTG-context] Improving Pandoc Support for ConTeXt

2015-10-26 Thread Aditya Mahajan
er {...} \stopmode etc could be written using \labeltext. For example: \chapter{\labeltext{notes}] \setuplabeltext[en][notes={Notes}] \setuplabeltext[es][notes={Notas}] etc. Why don’t you use \headtext? Because I did not know about it :-) Aditya_

Re: [NTG-context] Improving Pandoc Support for ConTeXt

2015-10-24 Thread Aditya Mahajan
is not written in a ConTeXtish way. A lot of \startmode[*en,*uk] \chapter{...} \stopmode \startmode[*es] \chapter {...} \stopmode etc could be written using \labeltext. For example: \chapter{\labeltext{notes}] \setuplabeltext[en][notes={Notes}] \setuplabeltext[es][notes={Notas}] etc. I think

[NTG-context] Changing font for math function

2015-05-15 Thread Maggyero
} ——— We also saw that \mfunctionlabeltext is inconsistent with ConTeXt \labeltext because the former has a style attached to it, so \mfunctionlabeltext should be removed from math-ini.mkiv and \mfunction{\mathlabeltext } should be used instead when needed. To go even further

[NTG-context] Changing font for math function

2015-05-13 Thread Maggyero
is unnecessary and inconsistent with the other ConTeXt command \labeltext since it has a style attached to it, so may confuse the user. The direct command \mathlabeltext (the math equivalent of \labeltext) should be preferred. Therefore I think Hans should remove \mfunctionlabeltext from math

Re: [NTG-context] Changing font for math function

2015-05-12 Thread Aditya Mahajan
to tag log-like operators). 1. Every command containing the word 'labeltext' should not have a style attached to it. 2. The word 'function' is misleading because \mfunction and \mfunctionlabeltext do not create a \mathop atom and it makes the user believe its usage is restricted for labeling

Re: [NTG-context] Changing font for math function

2015-05-12 Thread Hans Hagen
be removed, and \mfunctionlabeltext should be removed as well and one should directly use the already defined \mathlabeltext instead, for these 3 reasons: 1. Every command containing the word 'labeltext' should not have a style attached to it. 2. The word 'function' is misleading because \mfunction

[NTG-context] Changing font for math function

2015-05-12 Thread Maggyero
be removed as well and one should directly use the already defined \mathlabeltext instead, for these 3 reasons: 1. Every command containing the word 'labeltext' should not have a style attached to it. 2. The word 'function' is misleading because \mfunction and \mfunctionlabeltext do not create a \mathop

[NTG-context] Changing font for math function

2015-05-12 Thread Maggyero
Sorry, I did 3 typos in my previous post. — First typo: 3. Using only \mathlabeltext with \setuplabeltext is also more consistent with the current \labeltext that works with \setuplabeltext. 3. Using only \mathlabeltext with \setupmathlabeltext is also more consistent with the current \labeltext

[NTG-context] Citing a PhD dissertation

2015-02-01 Thread Idris Samawi Hamid ادريس سماوي حامد
} \stoppublication \placepublications [criterium=all] % inherits from \setuppublications % \completepublications[criterium=cite] % only works with criterium=all \stoptext But the output is still 'PhD thesis'. How do I get the changes in the btx labeltext passed on to ConTeXt so I can get

Re: [NTG-context] Citing a PhD dissertation

2015-02-01 Thread Idris Samawi Hamid ادريس سماوي حامد
is still 'PhD thesis'. How do I get the changes in the btx labeltext passed on to ConTeXt so I can get the correct output? Answer is in context/bib/bibl-apa.tex: \setuppublicationlayout[phdthesis]{% \insertauthors{}{ }{}% \insertpubyear{(}{). }{}% \inserttitle{\bgroup\it }{\egroup

Re: [NTG-context] PDF bookmarks - incorrect titles for registers

2013-11-26 Thread Hans Hagen
in place ... unexpandable macros are simply dropped so \labeltext{index} becomes index Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel

Re: [NTG-context] PDF bookmarks - incorrect titles for registers

2013-11-26 Thread Jan Tosovsky
[references.bookmarks.preroll] What is the correct usage of this? And are there any details why it is required and what exactly it does? as titles can be anything and bookmarks are limited, we need to have some protection in place ... unexpandable macros are simply dropped so \labeltext{index} becomes index

Re: [NTG-context] PDF bookmarks - incorrect titles for registers

2013-11-26 Thread Hans Hagen
On 11/26/2013 8:11 PM, Hans Hagen wrote: as titles can be anything and bookmarks are limited, we need to have some protection in place ... unexpandable macros are simply dropped so \labeltext{index} becomes index btw, using \complete... is just a compatibility command, if you use a normal

Re: [NTG-context] How to test the emptyness of a variable?

2013-11-10 Thread Géry Ogam
Thank you very much Aditya, now it works. As you said, the trick was to use \doiftextelse{}{}{} function as test of emptyness function, and \labeltext{chapter} instead of \currentstructurelabel as variable for the test because the latter was never found empty, even when it was. Thus the right

Re: [NTG-context] How to test the emptyness of a variable?

2013-11-09 Thread Aditya Mahajan
if the variable \currentstructurelabel is empty, so the code must be: Why not just check the labeltext? \define[1]\MyConversion {\doifelse{#1}{1}{ONE}{#1}} \define\CheckedConversion % #1 number {\doiftextelse{\labeltexts{chapter}}\MyConversion\numbers} \defineconversion

Re: [NTG-context] Conditional float references

2013-09-25 Thread Marco Patzer
On 2013–09–25 Otared Kavian wrote: I have not yet tried it with references to maths formulas, theorems, lemmas and such, Me neither. \ifsinglesided \strc_references_do_relative_else\plusone {\def\strc_references_smart_string{\labeltext\v!nextpage

Re: [NTG-context] Conditional float references

2013-09-25 Thread Otared Kavian
wrote: On 2013–09–25 Otared Kavian wrote: I have not yet tried it with references to maths formulas, theorems, lemmas and such, Me neither. \ifsinglesided \strc_references_do_relative_else\plusone {\def\strc_references_smart_string{\labeltext\v!nextpage

[NTG-context] Conditional float references

2013-09-22 Thread Marco Patzer
\currentreferencecontent\dummyreference \goto{\referencesequence}[#label]} \strc_references_stop_goto \stoptexdefinition \newif\ifreferenceisvisible \referenceisvisiblefalse \starttexdefinition strc_references_check_visibility \def\strc_references_smart_string{\labeltext\v!atpage\currentreferencepage

[NTG-context] textext sync problem?

2013-08-28 Thread Meer, H. van der
is that this occurs asynchronously, judging by the problem I encountered. On the metapost side I have: drawoptions(withcolor blue); pic := textext(labeltext); drawoptions(); % the pic is output later [cid:3EBB8ADD-F7B8-4DE1-8990-9EB0E0F45EF6@fritz.box] Deleting the reset implied by the second

Re: [NTG-context] textext sync problem?

2013-08-28 Thread Aditya Mahajan
of the metapost-context system, initiated of course from the metapost side. My impression is that this occurs asynchronously, judging by the problem I encountered. On the metapost side I have: drawoptions(withcolor blue); pic := textext(labeltext); drawoptions(); % the pic is output later Can you

Re: [NTG-context] textext sync problem?

2013-08-28 Thread Meer, H. van der
. My impression is that this occurs asynchronously, judging by the problem I encountered. On the metapost side I have: drawoptions(withcolor blue); pic := textext(labeltext); drawoptions(); % the pic is output later Can you posts complete minimal example? Drawoptions are only taken

Re: [NTG-context] setupformulas

2013-06-11 Thread Wolfgang Schuster
(A-1)! Any idea how the key is called to change this? You can change the separator between the section prefix and the formula number with \setupformula[prefixconnector=-]. Is there also a key for a own prefix, eg. my: (my-1)? It’s not a prefix but you can set a labeltext

Re: [NTG-context] setupformulas

2013-06-11 Thread Steffen Wolfrum
)? It’s not a prefix but you can set a labeltext. \setupformula[prefix=no] \setuplabeltext[formula=Steffen-] \starttext \chapter{Chapter} \placeformula \startformula c^2 = a^2 + b^2 \stopformula \stoptext nice, thank you. i was looking for a key within setupformula, and didn't think

[NTG-context] \setuphead [bodypartlabel=]

2013-03-26 Thread Alan BRASLAU
, more coherent, more logical, would be \startchapter [title=Introduction,incrementnumber=no,number=no,label=no] \stopchapter (Note that label=no is used for lists). This would also have the advantage of allowing the chapter labeltext to be defined for each language, rather than be empty, so

Re: [NTG-context] \setuphead [bodypartlabel=]

2013-03-26 Thread Wolfgang Schuster
=no,number=no,label=no] \stopchapter (Note that label=no is used for lists). This would also have the advantage of allowing the chapter labeltext to be defined for each language, rather than be empty, so that it could then be simply turned on or off. \setuplabeltext[en][chapter

Re: [NTG-context] \setuphead [bodypartlabel=]

2013-03-26 Thread Alan BRASLAU
be somewhat of a bug... Even better, more coherent, more logical, would be \startchapter [title=Introduction,incrementnumber=no,number=no,label=no] \stopchapter (Note that label=no is used for lists). This would also have the advantage of allowing the chapter labeltext to be defined

Re: [NTG-context] date problem

2013-03-20 Thread Meer H. van der
I see. But this is not working too. Following your suggestion I now get: \edef\thisdate{\ctxcommand{currentdate(month, ,day, , year,\currentlanguage)}}\writestatus{***}{\meaning\thisdate} *** macro:-\labeltext {march} 20 2013 The problem is essentially the same. I am most unhappy

Re: [NTG-context] date problem

2013-03-20 Thread Wolfgang Schuster
Am 20.03.2013 um 15:29 schrieb Meer H. van der h.vanderm...@uva.nl: I see. But this is not working too. Following your suggestion I now get: \edef\thisdate{\ctxcommand{currentdate(month, ,day, , year,\currentlanguage)}}\writestatus{***}{\meaning\thisdate} *** macro:-\labeltext

[NTG-context] date handling maltreated?

2013-03-20 Thread H. van der Meer
:#1-\ctxcommand {monthname(#1)}- \labeltext {unknown}RROR \year- 2013 \time- 982 I strongly ask that ConTeXt abstains from changing the definition of \month and reverts to the exact result as given by plain TeX, i.e. a number in the range [1-12]. Because

  1   2   3   >